if Variable DENALI_X64 Equals FALSE
  Set x64 - Native 64 bit Windows, AMD64 and EM64T Architectures - installation mode
  Set Variable PROGRESSTEXT to Installing Microsoft SQL Server Express 2012 (x64)
  Set Variable DENALI_FILEBAG_X64 to 
  Set Variable DENALI_RESULT_X64 to 
  Set Variable DENALI_ERROR_X64 to 
  Get Common Folder Location Special->Boot Path into DENALI_BOOTPATH_X64
  Does File Exist $DENALI_BOOTPATH_X64$\en_sql_server_2012_express_sqlexpr_x64\Windows6.0-KB956250-x64.MSU (get result into variable DENALI_UPDATED_X64)
  Define File Bag : #IADIR#\runtimes\denalibin_x64.7zip, include files recursively, get runtime location of files into variable DENALI_FILEBAG_X64
  Extract 7Zip Archive $DENALI_FILEBAG_X64$\denalibin_x64.7zip into folder $DENALI_BOOTPATH_X64$ (get result into variable DENALI_EXTRACT_X64)
  if Variable DENALI_EXTRACT_X64 not Equals SUCCESS
    MessageBox: $TITLE$ Setup, Unable to extract temporary files for Microsoft SQL Server Express 2012 (x64) installation. $DENALI_EXTRACT_X64$$NEWLINE$$NEWLINE$Please free up some space on your boot drive and try again.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
    Terminate Installation
  end
  if Variable DENALI_ISSEVEN_X64 Equals FALSE
    Set Variable PROGRESSTEXT to Installing Microsoft Windows Vista Update for Microsoft SQL Server Express 2012 (x64)
    Set Variable PROGRESSMODE to MARQUEE
    Run Program wusa.exe "$DENALI_BOOTPATH_X64$\en_sql_server_2012_express_sqlexpr_x64\Windows6.0-KB956250-x64.MSU" /quiet /norestart (WAIT)
    Set Variable PROGRESSMODE to 
    Set Variable PROGRESSTEXT to Installing Microsoft SQL Server Express 2012 (x64)
  else
    Set Variable DENALI_UPDATED_X64 to TRUE
  end
  Get System Setting Logged on Computer Name into SQL_COMPUTER_NAME
  Get System Setting Logged on User Name into SQL_USER_NAME
  Set Variable PROGRESSMODE to MARQUEE
  Set Variable DENALI_COMMAND_LINE_X64 to /q /ACTION=Install /SECURITYMODE=SQL /SAPWD="System2008#" /INSTANCENAME="PALLADIUMSQL" /FEATURES=SQLEngine,Replication,SDK /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSYSADMINACCOUNTS="$SQL_COMPUTER_NAME$\$SQL_USER_NAME$" /IAcceptSQLServerLicenseTerms=TRUE
  Run Program $DENALI_BOOTPATH_X64$\en_sql_server_2012_express_sqlexpr_x64\setup.exe $DENALI_COMMAND_LINE_X64$ (WAIT, get result into variable DENALI_RESULT_X64)
  Set Variable PROGRESSMODE to 
  if Variable DENALI_RESULT_X64 Equals 3010
    Recursively Delete Files $DENALI_BOOTPATH_X64$\en_sql_server_2012_express_sqlexpr_x64\*.*
    Call DLL Function kernel32.dll->RemoveDirectoryA
    MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
    if Variable REBOOTNOW Equals OK
      Reboot Computer and Resume Setup
    else
      Terminate Installation
    end
  else
    if Variable DENALI_RESULT_X64 not Equals 0
      if Variable DENALI_UPDATED_X64 Equals FALSE
        MessageBox: $TITLE$ Setup, Your computer needs to be restarted before $TITLE$ Setup can continue.$NEWLINE$$NEWLINE$Please save your work in all running programs and click OK to restart your computer. Setup will resume once your computer restarts.$NEWLINE$$NEWLINE$If you click CANCEL, setup will exit. You will have to run setup again at a later time to install $TITLE$.
        if Variable REBOOTNOW Equals OK
          Reboot Computer and Resume Setup
        else
          Terminate Installation
        end
      end
      Recursively Delete Files $DENALI_BOOTPATH_X64$\en_sql_server_2012_express_sqlexpr_x64\*.*
      Call DLL Function kernel32.dll->RemoveDirectoryA
      MessageBox: $TITLE$ Setup, Microsoft SQL Server Express 2012 (x64) could not be installed. Please use Windows Update to manually install this update on your system.$NEWLINE$$NEWLINE$$TITLE$ Setup cannot continue.
      Terminate Installation
    else
      Recursively Delete Files $DENALI_BOOTPATH_X64$\en_sql_server_2012_express_sqlexpr_x64\*.*
      Call DLL Function kernel32.dll->RemoveDirectoryA
    end
  end
  Set Win32 - Native 32 bit Windows and Windows 32 on Windows 64 (WOW64) - installation mode
end
 
